package com.library.Language.service.impl;

import com.library.Language.mapper.LanguageMapper;
import com.library.Language.model.Language;
import com.library.Language.model.LanguageExample;
import com.library.Language.service.LanguageService;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LanguageServiceImpl implements LanguageService {
    
    private LanguageMapper languageMapper;

    //通过构造函数注入mapper
    @Autowired
    public LanguageServiceImpl(LanguageMapper languageMapper) {
        this.languageMapper = languageMapper;
    }

    public long countByExample(LanguageExample example) {
        return languageMapper.countByExample(example);
    }

    public int deleteByExample(LanguageExample example) {
        return languageMapper.deleteByExample(example);
    }

    public int deleteByPrimaryKey(Integer id) {
        return languageMapper.deleteByPrimaryKey(id);
    }

    public int insert(Language record) {
        return languageMapper.insert(record);
    }

    public int insertSelective(Language record) {
        return languageMapper.insertSelective(record);
    }

    public List<Language> selectByExample(LanguageExample example) {
        return languageMapper.selectByExample(example);
    }

    public Language selectByPrimaryKey(Integer id) {
        return languageMapper.selectByPrimaryKey(id);
    }

    public int updateByExampleSelective(@Param("record") Language record, @Param("example") LanguageExample example) {
        return languageMapper.updateByExampleSelective(record, example);
    }

    public int updateByExample(@Param("record") Language record, @Param("example") LanguageExample example) {
        return languageMapper.updateByExample(record, example);
    }

    public int updateByPrimaryKeySelective(Language record) {
        return languageMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(Language record) {
        return languageMapper.updateByPrimaryKey(record);
    }
}